package com.lecture.junit.tdd.example;

import java.util.concurrent.atomic.AtomicInteger;

public class AfterSecondLoginState extends LoginServiceState {

	public AfterSecondLoginState(AtomicInteger counter) {
		super(counter);
	}

	@Override
	protected void handlePasswordFail(LoginServiceInterface context, IAccount acc) {
        if (attemptCounter.incrementAndGet() >= MAX_ATTEMPT_COUNT)
        	acc.setRevoked();
	}
}
